<div class="row-fluid">
	<div class="span12">
		<div class="operation">
			<form action="<?php echo BASE_URL?>map-management/search" method="post">				
				<div class="input-append">
			    	<input type="search" value="<?php echo isset($str)?$str:""; ?>" name="txt-search" id="appendedInputButton" placeholder="Province name">						
					<a href="" class="btn add-on submit"><i class="icon-search"></i> Search</a>
				</div>
				<a href = "<?php echo BASE_URL?>map-management/add-province" class="btn"><i class="icon-plus"></i> Add New</a>
			</form>	
		</div>	
	</div>
</div>
<div class="row-fluid">
	<div class="span12">
		<table class="table table-striped table-bordered table-hover">		
		<thead>
			<tr>
				<th>No.</th>
				<th>Province Name</th>
				<th>Shape</th>
				<th>Latitute &amp; Longtitute</th>
				<th>Color</th>
				<th>Created</th>
				<th>Modified</th>
				<th>Option</th>
			</tr>
		</thead>
		<tbody>
			<?php 		
					$i = 0;
					if(count($records)){
						foreach($records as $record){
							$i++;
							echo '
								<tr>
								<td class="">' . $i . '</td>
								<td>' . $record->province_name . '</td>
			    				<td class="text-center">' . $record->shape . '</td>
								<td class=""><div class="ellipsis">' . $record->lat_lon . '</div></td>
								<td class="text-center">' . $record->color . '</td>
								<td class="text-center">' . $record->created . '</td>
								<td class="text-center">' . $record->modified . '</td>
								<td class="text-center">
									<a href="' . getController('url') . 'edit-province/' . $record->id . '">Edit</a> |
									<a href="' . getController('url') . 'delete-province/' . $record->id . '" onclick="if(!confirm(\'Do you want to delete this province [' . $record->province_name . ']?\')) return false;">Delete</a>									
								</td>
								</tr>
							';
						}
					}else{
						echo '
							<tr>
								<td colspan="7" align="center" class="text-center">Search not found...</td>
							</tr>
							';
					}
			?>
		</tbody>
		</table>	
	</div>
</div>

